#!/usr/bin/env node

const Koa = require('koa'),
      logger = require('./middleware/logger.js'),
      //task = require('./lib/task.js'),
      log = console.log;

const app = new Koa();

//ctx 上下文； next 调用后面的中间件 

app.use(logger);

app.use(async (ctx,next) => {              //M-hello
  ctx.body = 'hello koa!';
});

app.listen(8080);

